import request from '@/utils/request'

// 查询监测点位列表
export function listPoint(query) {
  return request({
    url: '/slope/point/list',
    method: 'get',
    params: query
  })
}

// 查询监测点位详细
export function getPoint(pointId) {
  return request({
    url: '/slope/point/getInfo/' + pointId,
    method: 'get'
  })
}

// 新增监测点位
export function addPoint(data) {
  return request({
    url: '/slope/point/add',
    method: 'post',
    data: data
  })
}

// 修改监测点位
export function updatePoint(data) {
  return request({
    url: '/slope/point/edit',
    method: 'post',
    data: data
  })
}

// 删除监测点位
export function delPoint(pointId) {
  return request({
    url: '/slope/point/remove/' + pointId,
    method: 'post'
  })
}

// 导出监测点位
export function exportPoint(query) {
  return request({
    url: '/slope/point/export',
    method: 'get',
    params: query
  })
}

// 修改监测点位状态
export function changePointStatus(query) {
  return request({
    url: '/slope/point/changeStatus',
    method: 'post',
    params: query
  })
}

// 禁用，启用
export function changeStatus(data) {
  return request({
    url: '/slope/point/changeStatus',
    method: 'post',
    params: data
  })
}

// 新增点位名称是否重复
export function checkPointName(data) {
  return request({
    url: '/slope/point/checkPointName?name='+data,
    method: 'get'
  })
}

// 没有设置权限的点位列表
export function noRoleListPoint(query) {
  return request({
    url: '/slope/point/noRoleList',
    method: 'get',
    params: query
  })
}
